package com.qp.bookkeeping.business.common.service.impl;

import com.qp.bookkeeping.business.common.model.rsp.DateQueryRsp;
import com.qp.bookkeeping.business.common.service.CommonService;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

/**
 * @author xutianqi
 */
@Service
public class CommonServiceImpl implements CommonService {
    /**
     * @return
     */
    @Override
    public DateQueryRsp queryData() {
        LocalDateTime now = LocalDateTime.now();
        return DateQueryRsp.builder()
                .year(String.valueOf(now.getYear()))
                .month(String.valueOf(now.getMonthValue()))
                .day(String.valueOf(now.getDayOfMonth())).build();
    }
}
